<div class="modal-header">
    <h4>模型上架/下架审批历史</h4>
    ————
    {{data.solutionName}}
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" (click)="onClose()">
        <span>&times;</span>
    </button>
</div>

<div class="modal-body">
    <mat-card>
        <div class="table-responsive">
            <table class="table">
                <thead>
                <tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="transition.bind(this)">
                    <th jhiSortBy="requestDate"><span>申请日期</span> <span class="fa fa-sort"></span></th>
                    <th><span>申请类型</span></th>
                    <th><span>申请理由</span></th>
                    <th><span>审批人</span></th>
                    <th><span>审批日期</span></th>
                    <th><span>审批结果</span></th>
                    <th><span>审批意见</span></th>
                </tr>
                </thead>
                <tbody *ngIf="publishRequests">
                    <tr *ngFor="let publishRequest of publishRequests; trackBy: trackIdentity">
                        <td>{{publishRequest.requestDate | date:'yy-MM-dd HH:mm'}}</td>
                        <td>
                            <span style="color: blue" *ngIf="publishRequest.requestType === '申请上架'">{{publishRequest.requestType}}</span>
                            <span style="color: #f47741" *ngIf="publishRequest.requestType === '申请下架'">{{publishRequest.requestType}}</span>
                        </td>
                        <td>{{publishRequest.requestReason}}</td>
                        <td>{{publishRequest.reviewUserLogin}}</td>
                        <td>{{publishRequest.reviewDate | date:'yy-MM-dd HH:mm'}}</td>
                        <td>
                            <span *ngIf="publishRequest.reviewResult === '批准'" style="color: green" matTooltip="{{publishRequest.reviewComment}}">批准</span>
                            <span *ngIf="publishRequest.reviewResult === '拒绝'" style="color: red" matTooltip="{{publishRequest.reviewComment}}">拒绝</span>
                        </td>
                        <td>{{publishRequest.reviewComment}}</td>
                    </tr>
                </tbody>
            </table>
        </div>
        <br>
        <div>
            <mat-paginator #paginator
                           [length]="totalItems"
                           [pageSize]="itemsPerPage"
                           [pageSizeOptions]="pageSizeOptions"
                           (page)="reloadPage($event)"
                           showFirstLastButtons>
            </mat-paginator>
        </div>
    </mat-card>
</div>

<div class="modal-footer">
    <button mat-raised-button color="primary" (click)="onClose()">
        <span class="fa fa-check-circle">&nbsp;确定</span>
    </button>
</div>
